﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Structural
{
    /// <summary>
    /// The 'Adapter' class, wrapper class
    /// adapts the interface Adaptee to the Target interface.
    /// wrapper the existed interface "Adaptee.SpecificRequest"
    /// Adatper和Adaptee是Assocation关系，这个Adapter模式是对象的
    /// </summary>
    class Adapter : Target
    {
        private Adaptee _adaptee = new Adaptee();

        public override void Request()
        {
            // Possibly do some other work
            //  and then call SpecificRequest
            _adaptee.SpecificRequest();
        }
    }
}
